#include <stdint.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include "module.h"
#include <stdint.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <sys/select.h>
#include "keymgt.h"
#include "prn_drv.h"
#include <sys/err.h>
#include <stdio.h>

extern sys_api_t * sysapi;

int prn_start(void)
{
	    return sysapi->prn_start();
}

int prn_string(const char *fmt, ...)
{
        int ret;
        va_list args;
        va_start(args,fmt);
        ret = _doprntx(fmt, args, sysapi->prn_putch, 0);
        va_end(args);
        return ret;
}


int prn_set_font(hz_font_em hz_font, zm_font_em zm_font)
{
	    return sysapi->prn_set_font(hz_font, zm_font);
}
int prn_set_underline(uint8_t pstatus)
{
	    return sysapi->prn_set_underline(pstatus);
}
int prn_set_spacing(int border, int column, int row)
{
	    return sysapi->prn_set_spacing(border, column, row);
}
int prn_set_grey(uint8_t grey)
{
	    return sysapi->prn_set_grey(grey);
}

int prn_get_status( prn_status_em *status)
{
	    return sysapi->prn_get_status(status);
}
int prn_image(int x_size, int y_size, int x_pos, const char *img)
{
	    return sysapi->prn_image(x_size, y_size, x_pos, img);
}

int  prn_init(void)
{
	    return sysapi->prn_init();
}
